package com.babble.subitem.launch;

import org.springblade.common.constant.CommonConstant;
import org.springblade.core.launch.service.LauncherService;
import org.springframework.boot.builder.SpringApplicationBuilder;

import java.util.Properties;

public class WebSubmittedLauncherServiceImpl implements LauncherService {

	@Override
	public void launcher(SpringApplicationBuilder builder, String appName, String profile) {
		Properties props = System.getProperties();
		props.setProperty("spring.cloud.nacos.config.shared-configs[0].data-id", "blade.yaml");
		props.setProperty("spring.cloud.nacos.config.shared-configs[0].group", "DEFAULT_GROUP");
		props.setProperty("spring.cloud.nacos.config.shared-configs[0].refresh", "true");

		props.setProperty("spring.cloud.nacos.config.prefix", CommonConstant.BABBLE_PREFIX);
		props.setProperty("spring.cloud.nacos.config.group", CommonConstant.BABBLE_PREFIX);
	}

	@Override
	public int getOrder() {
		return 10;
	}
}
